<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                    template="./AdminTemplate.xhtml">
        <ui:define name="Title">
            <title>Order Admin</title>
        </ui:define>
        <ui:define name="content">
            <h:form>
                <div id="contenner">
                    <div id="content" style="font-size: 0.8em">
                        <p:dataTable  rendered="#{adminVihicleBean.emp.position==1}" id="datatable" value="#{adminVihicleBean.listOrder}" var="order"  widgetVar="vehicleTable"
                                   emptyMessage="No cars found with given criteria">
                            <f:facet name="header">
                                <p:outputPanel>
                                    <h:outputText value="Search all fields: " />
                                    <p:inputText id="globalFilter" onkeyup="vehicleTable.filter()" style="width:100px" />
                                </p:outputPanel>

                            </f:facet>
                            <p:column id="priceColumn" filterBy="#{order.price}" headerText="Price">
                                <h:outputText value="#{order.price}"/>
                            </p:column>
                            <p:column id="dateRegisColumn" filterBy="#{order.dateRegis}" headerText="DateRegis">
                                <h:outputText value="#{order.dateRegis}"/>
                            </p:column>
                           
                        </p:dataTable>
                        <p:panel id="p1" rendered="#{adminVihicleBean.emp.position!=1}" header="Sorry" footer="sorry">
                            Sorry Ban khong co quyen vao trang nay
                        </p:panel>
                    </div>
                </div>
            </h:form>
        </ui:define>
    </ui:composition>
</html>
